/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Control;
import Model.*;
import DBLayer.*;
import java.util.ArrayList;

/**
 *
 * @author Vlad
 */
public class CtrInvoice {
    public CtrInvoice() {

    }
    
    public ArrayList<Product> findAllInvoices(){
        DbInterfaceInvoice dbInvoice = new DbInvoice();
        ArrayList allInvoices = new ArrayList();
        allInvoices = dbInvoice.getAllInvoices();
        return allInvoices;
    }

    public Invoice findByNo(String no) {
        DbInterfaceInvoice dbInvoice = new DbInvoice();
        return dbInvoice.searchByNo(no);
    }

    public void insertInv(Invoice inv) {
        DbInterfaceInvoice dbInv = new DbInvoice();
        dbInv.insertInvoice(inv);
    }

}
